package com.kingmed.kmss.admin.modules.ums.model;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.kingmed.kmss.common.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 后台组织机构表
 * </p>
 */
@Data
@TableName("ums_organization")
@ApiModel(value = "UmsOrganization对象", description = "后台组织机构表")
public class UmsOrganization extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("父级ID")
    private Long parentId;

    @ApiModelProperty("组织代码")
    private String orgCode;

    @ApiModelProperty("组织代码")
    private String orgParentCode;

    @ApiModelProperty("组织名称")
    private String orgName;

    @ApiModelProperty("组织数据类别")
    private Integer orgType;

    @ApiModelProperty("组织级数")
    private Integer level;

    @ApiModelProperty("直属公司ID")
    private Long companyId;

    @ApiModelProperty("直属公司ID （HR系统）")
    private String companyHrId;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    @ApiModelProperty("是否归档（0=可用，1=失效） 默认0")
    private Integer status;

    @ApiModelProperty("删除标记")
    @TableField
    @TableLogic(value = "0", delval = "1")
    private Integer deleteFlag;

    @TableField(exist = false)
    private Boolean hasChildren;

    @ApiModelProperty("省份编码")
    private Long provinceCode;

    @ApiModelProperty("省份名字")
    private String provinceName;

}
